# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-geoip2
_pkgname=geoip2
pkgver=3.0.0
pkgrel=2
pkgdesc='MaxMind GeoIP2 API.'
arch=('any')
url='https://pypi.python.org/pypi/GeoIP/'
license=('Apache')
depends=('python2' 'python2-requests' 'python2-urllib3' 'python2-maxminddb'
         'geoip')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('d37b37a498d8e13ab6cacebbd751b3e28722e05393c07450d72f180660423f5c23b03604ab65b8591b2c3f102cb513204ef093aaab791097a8fef3883f734256')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

